<%-- 
    Document   : header
    Created on : Jan 28, 2013, 2:30:47 PM
    Author     : NganNLK60334
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<link href="CSS/CSSAdmin/adminHeader.css" rel="stylesheet" type="text/css">
<link href="CSS/CSSAdmin/manageProduct.css" rel="stylesheet" type="text/css">
<%-- <link href="CSS/CSSAdmin/manageFB.css" rel="stylesheet" type="text/css"> --%>


<div id="header">
    <div class="login-block-wrapper" style="float: right; cursor: pointer;">
        <div class="login-block">
            <form method="post" action="LoginServlet" onsubmit="return validateLogin()">
                <%@page language="java" %>
                <%String user = (String) session.getAttribute("USER");
                            String role = (String) session.getAttribute("ROLE");
                            session.getAttribute("FULLNAME");
                            if (user != null) {%>
                <div>
                    <%if (!role.equals("Admin")) {%>
                    <font color="#000066">Welcome</font>
                    <font color="#FF0000" style="font-weight: bold;"><b> ${sessionScope.FULLNAME}</b></font>
                    <%}%>
                    <%if (role.equals("Admin")) {%>
                    <font color="#000066">Welcome</font>
                    <font color="#FF0000" style="font-weight: bold;"><b> ${sessionScope.FULLNAME}</b></font>
                    <%}%>
                    | <a href="Controller?btnAction=logout" style="font-weight: bold;color: #000066; text-decoration: none">Đăng xuất</a> |
                    <input type="hidden" id="user-account" value="${sessionScope.USER}"/>
                    <a href="Controller?btnAction=accountDetail" style="font-weight: bold;color: #000066; text-decoration: none">Thông tin tài khoản</a>

                </div>
                <%} else {%>
                <input class="user" id="username" type="text" name="txtUsername" value="" maxlength="16" placeholder=" Tài khoản">
                <input class="pass" id="password" type="password" name="txtPassword" value="" maxlength="16" placeholder=" Mật khẩu">
                <button class="login-btn" type="submit" name="btnAction" value="login">Đăng nhập</button>|
                <a class="regist-btn" href="Controller?btnAction=register" ><span>Đăng kí</span></a><br/>
                <font id="loginError" style="color: #FF0000; font-weight: bold">${requestScope.loginError}</font>
                <%}%>
            </form>
        </div>
    </div
    <div id ="logo-wraper">
        <div id="logo" align="center" style="float: left; margin-left: 300px; cursor: pointer;">
            <font id ="logo-name"> Funny Fashion </font> <br/>
            <font id="slogan">Phong cách thời trang của bạn </font>
        </div>
    </div>

    <div id="menu-tab-wraper">

        <div id ="menu-tab">
            <a href ="AdminController?btnAction=manageProduct"> Quản lí sản phẩm </a>
            <a href ="AdminController?btnAction=addProduct">Thêm sản phẩm</a>
            <a href ="AdminController?btnAction=manageFB">Quản lí phản hồi</a>
            <a href ="AdminController?btnAction=manageOrder">Quản lí đặt hàng</a>
        </div>
    </div>
</div>


